import React, { Component } from 'react'

export default class App extends Component {
  state = {
    iptVal: '🐂'
  }
  handleSubmit = () => {
    console.log('提交的内容：', this.state.iptVal)
  }
  handleChange = (e)=> {
    console.log(e.target)
    this.setState({
      iptVal: e.target.value
    })
  }
  render() {
    return (
      <div>
        <input type="text" value={this.state.iptVal} onChange={this.handleChange}/>
        <button onClick={this.handleSubmit}>提交ipt表单内容</button>
      </div>
    )
  }
}
